#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
DIR=msegui
FILE=../mseide-msegui_$2.orig.tar.gz

# clean up the upstream tarball
unzip $3
(cd $DIR && rm -rf ./docs ./contrib*)
tar czf $FILE $DIR
rm -rf $3 $DIR

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
    . .svn/deb-layout
    mv $FILE $origDir
    echo "moved $FILE to $origDir"
fi
